home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Prog / D-G / FKeys ƒ / InvisiWin.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-11-29  |  794 b   |  42 lines  |  [TEXT/KAHL]

  1.  
  2. /*
  3.     InvisiWin FKey #7  --  Version 1.00  --  Nov 28, 1988
  4.     
  5.     Copyright (c) 1988 by Neal E. Trautman
  6.     
  7.     'ShareWare' -- Please send $3 contribution to:
  8.         Neal Trautman
  9.         1701 S.W. 42nd Street
  10.         Fargo, ND  58103
  11.     
  12.     This FKey makes the content region of the front window transparent.
  13.         (If it is already transparent, the content region returns)
  14. */
  15.  
  16. main()
  17. {
  18.     register WindowPeek    win;
  19.     register RgnHandle    oldContent;
  20.     
  21.     win = (WindowPeek)FrontWindow();
  22.     if (win)
  23.         {
  24.         oldContent = win->contRgn;
  25.         if (EmptyRgn(oldContent))
  26.             {
  27.             ShowHide(win,FALSE);
  28.             ShowHide(win,TRUE);
  29.             }
  30.         else
  31.             {
  32.             win->contRgn = NewRgn();
  33.             DiffRgn(win->strucRgn,oldContent,win->strucRgn);
  34.             CalcVisBehind(win,oldContent);
  35.             PaintBehind(win,oldContent);
  36.             DisposeRgn(oldContent);
  37.             }
  38.         }
  39.     else
  40.         SysBeep(2L);
  41. }
  42.